package cn.volunteer.points.system.handle;

/**
 * @description: 自定义业务日常
 * @author:
 * @create: 创建时间：2021-05-09
 **/
public class ServiceException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private int code;

    public ServiceException(int code, String msg) {
        super(msg);
        this.code = code;
    }

    public ServiceException(ServiceErrorCode errorCode) {
        super(errorCode.getDesc());
        this.code = errorCode.getCode();
    }

    public int getCode() {
        return this.code;
    }

}
